package com.cruise.game.model.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * 聊天实体
 *
 * @author cruise
 * @date 2025-02-28
 */
@Data
@TableName("chats")
public class Chat implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 主键ID
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    /**
     * 用户ID
     */
    private Long userId;

    /**
     * 管理员ID
     */
    private Long adminId;

    /**
     * 消息内容
     */
    private String message;

    /**
     * 是否来自用户
     */
    private Boolean isFromUser;

    /**
     * 创建时间
     */
    private LocalDateTime createdAt;
}